package top.jandmla.shop.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true) //set方法返回对象！
@TableName("tb_product")
public class Product {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("productName")
    private String productName;

    @TableField("productType")
    private Integer productType;

    @TableField("productDiscount")
    private Integer productDiscount;

    @TableField("productImage")
    private String productImage;

    @TableField("productPrice")
    private BigDecimal productPrice;

    @TableField("productIntro")
    private String productIntro;

    /**
     * 表示价格查询范围
     * 1：大于传输价格
     * -1：小于传输价格
     */
    @TableField(exist = false)
    private int code;


}